using SqlSugar;

namespace Auth.Domain.Entities
{
    [SugarTable("Auth_User")]
    public class UserModel : BaseEntity
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50)]
        public string UserName { get; set; }
        
        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 100)]
        public string Password { get; set; }
        
        /// <summary>
        /// 真实姓名
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string RealName { get; set; }
        
        /// <summary>
        /// 邮箱
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 100)]
        public string UserCode { get; set; }
        
        /// <summary>
        /// 电话
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 20)]
        public string Phone { get; set; }
        
        /// <summary>
        /// 角色ID
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string RoleId { get; set; }
        
        /// <summary>
        /// 角色名称
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50)]
        public string RoleName { get; set; }
        
        /// <summary>
        /// 最后登录时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [SugarColumn(IsNullable = false, DefaultValue = "0")]
        public bool IsActive { get; set; } = false;
    }
} 